unit fScheduleView;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs,          
         
         
       
         
      ExtCtrls, cxMemo, cxMaskEdit, cxSpinEdit,
  cxTimeEdit, cxTextEdit, cxControls, cxContainer, cxEdit, cxLabel, Menus,
  cxLookAndFeelPainters, StdCtrls, cxButtons, cxGraphics, cxLookAndFeels,
  dxSkinsCore, dxSkinCaramel, dxSkinOffice2010Silver, dxSkinSeven;

type
  TfmScheduleView = class(TForm)
    cxLabel1: TcxLabel;
    edtTitle: TcxTextEdit;
    edtStart: TcxTimeEdit;
    cxLabel2: TcxLabel;
    edtContent: TcxMemo;
    Bevel1: TBevel;
    cxLabel3: TcxLabel;
    edtFinish: TcxTimeEdit;
    Bevel2: TBevel;
    cxButton1: TcxButton;
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    Id: Integer;
  end;

var
  fmScheduleView: TfmScheduleView;

implementation

uses
  tools, fClientDataModule;

{$R *.dfm}

procedure TfmScheduleView.FormShow(Sender: TObject);
begin
  OpenPublicQuery('select dsc_caption,dsc_start,dsc_finish,dsc_message from d_schedule where dsc_id='+IntToStr(Id));
  with ClientDataModule do
  begin
    self.Caption := tblDynamic.FieldByName('dsc_caption').AsString;
    edtTitle.Text := tblDynamic.FieldByName('dsc_caption').AsString;
    edtContent.Text := tblDynamic.FieldByName('dsc_message').AsString;
    edtStart.Time := tblDynamic.FieldByName('dsc_start').AsDateTime;
    edtFinish.Time := tblDynamic.FieldByName('dsc_finish').AsDateTime;

  end;
end;

end.
